<template>
  <ls-dialog title="历史套餐记录" class="m-l-10 inline" @open="handleOpen" top="10vh" width="50vw">
    <el-button type="text" size="mini" slot="trigger">
      查看历史套餐
    </el-button>

    <div style="height: 500px">
      <el-table :data="historyMeal" ref="paneTable" style="width: 100%;" size="mini">
        <!-- 套餐名称 -->
        <el-table-column prop="set_meal_name" label="套餐名称" min-width="100">
        </el-table-column>
        <!-- 套餐到期时间 -->
        <el-table-column prop="expires_time" label="套餐到期时间" min-width="120">
        </el-table-column>
        <!-- 日志 -->
        <el-table-column prop="content" label="日志" min-width="120">
        </el-table-column>
        <!-- 操作人 -->
        <el-table-column prop="operator" label="操作人" min-width="160">
        </el-table-column>
        <!-- 操作时间 -->
        <el-table-column prop="create_time" label="操作时间" min-width="200">
        </el-table-column>
      </el-table>
    </div>
  </ls-dialog>
</template>

<script lang="ts">
import { apisetMealLogLists } from '@/api/shop'
import LsDialog from '@/components/ls-dialog.vue'
import { Component, Prop, Vue } from 'vue-property-decorator'

@Component({
  components: {
    LsDialog,
  }
})
export default class HistoryMeal extends Vue {

  @Prop({ default: '' }) id!: string

  /** S Data **/
  historyMeal: any = []
  /** E Data **/

  /** S Methods **/
  // 获取商城列表
  async getShopLists () {
    this.historyMeal = await apisetMealLogLists({id: this.id})
  }

  handleOpen (): void {
    this.getShopLists()
  }
  /** E Methods **/
}
</script>

<style scoped>

</style>
